package com.learn.project2.model.vo.admin.history;


import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @description: 搜索历史的响应数据封装
 * @author wxy
 * @date 2022-01-08 11:48
 * @version 1.0
 */
@NoArgsConstructor
@Data
public class HistoryListVO {

    private Integer total;
    private Integer pages;
    private Integer limit;
    private Integer page;
    private List<HistoryVO> list;

    public static HistoryListVO data(long total, Integer pages, Integer limit, Integer page, List list) {
        HistoryListVO historyListVO = new HistoryListVO();
        historyListVO.setTotal((int) total);
        historyListVO.setPages(pages);
        historyListVO.setPage(page);
        historyListVO.setLimit(limit);
        historyListVO.setList(list);
        return historyListVO;
    }

}
